package util

import (
	"time"
)

// 时间
func TimeN() time.Time {
	time.Local = time.FixedZone("CST", 8*3600)
	return time.Now()
}

// 年
func Year() int {
	return TimeN().Year()
}

// 年字符串
func YearStr() (int, string) {
	year := Year()
	return year, string(year)
}

// 月
func Month() (uint, string) {
	month := TimeN().Month()
	return uint(month), string(month)
}

// 日
func Day() (uint, string) {
	day := TimeN().Day()
	return uint(day), string(day)
}

// 周
func Week() time.Weekday {
	now := time.Now()
	return now.Weekday()
}

// 周字符串
func WeekStr() string {
	now := time.Now()
	return now.Weekday().String()
}

// 时
func Hour() (uint, string) {
	hour := TimeN().Hour()
	return uint(hour), string(hour)
}

// 分
func Min() (uint, string) {
	min := TimeN().Minute()
	return uint(min), string(min)
}

// 秒
func Second() (uint, string) {
	second := TimeN().Second()
	return uint(second), string(second)
}

// 时间戳
func Time() int64 {
	time := TimeN()
	return time.Unix()
}

// 毫秒
func Milli() int64 {
	time := TimeN()
	return time.UnixMilli()
}

// 微秒
func Micro() int64 {
	time := TimeN()
	return time.UnixMicro()
}

// 纳秒
func Nanosecond() uint64 {
	time := TimeN()
	return uint64(time.Nanosecond())
}

func Date(t int64) {
}
